package com.sikao.app.dao;

import android.content.Context;

import com.sikao.app.bean.AddCollectBean;
import com.sikao.app.bean.CheckCollectBean;
import com.sikao.app.net.OnNetBackListener;
import com.sikao.app.net.SpotsCallBack;
import com.squareup.okhttp.Response;

/**
 * Created by Sun on 2016/8/31
 * [83]查看某一事物是否被关注过
 */
public class CheckCollectModel extends BaseModel {
    public CheckCollectModel(Context context, OnNetBackListener listener) {
        super(context, listener);
    }

    @Override
    public void request(String data, boolean isShow) {
        String []array = {"user","user","ApiCollect","checkCollect",time,data};

        map = getMap(array);
        post(map,new SpotsCallBack<CheckCollectBean>(context,isShow){

            @Override
            public void onSuccess(Response response, CheckCollectBean result) {
                onNetBackListener.netBack(result);
            }

            @Override
            public void onError(Response response, int code, Exception e) {
            }
        });
    }
}
